/**
    Copyright (c) 2010 yakiimo02
    Distributed under the New BSD License.
    See included license.txt or http://www.yakiimo3d.com/NewBSDLicense.txt
**/

#pragma once

#include <string>

/**
    @brief  Load and manage hdr images. 
    @author yakiimo02
    @date    2010/03/07
*/
class HDRImageMgr
{
public:
    HDRImageMgr();
    ~HDRImageMgr();

    void    Destroy();

    HRESULT LoadDefaultImage( ID3D11Device* pd3dDevice );
    HRESULT LoadImage( ID3D11Device* pd3dDevice, const std::wstring& strFilePath );

    inline    ID3D11ShaderResourceView*    GetpSRV() { return m_pSRView; }
    inline    int                            GetWidth() const { return m_desc.Width; }
    inline    int                            GetHeight() const { return m_desc.Height; }

protected:
    ID3D11Texture2D*                m_pTexture;
    ID3D11ShaderResourceView*        m_pSRView;
    D3D11_TEXTURE2D_DESC            m_desc;
    std::wstring                    m_strFilePath;
};

extern HDRImageMgr g_hdrImageMgr;